# 序列通用操作
str1 = "gagsdfas"
print("123" + "456")
print(len(str1))
print(max(str1))
print(min(str1))
print("s" in str1)

# 遍历
for i in str1:
    print(i)

for index, value in enumerate(str1):
    print(index, value, sep=":")

for i in range(len(str1)):
    print(str1[i])

# 常用方法
str2 = "sf sofa"
print(str2.islower())
print(str2.count("s"))
print(str2.index("s"))
print(str2.strip())
print(str2.split(" "))
print("&".join(["234", "asdf"]))

# 统计文章中字母、数字、符号的个数
# s = input("请输入一篇文章：")
# a, b, c = 0, 0, 0
# for i in s:
#     if i.isalpha():  # 字母
#         a += 1
#     elif i.isdigit():  # 数字
#         b += 1
#     else:
#         c += 1
# print(a, b, c, sep=" ")


print('a'.isalpha())
print('1'.isdigit())